package com.cci.kangdao.dao;


import com.cci.kangdao.dao.model.AttendanceRecordT;
import com.cci.kangdao.dto.request.AttendanceUserStatisticsRequest;
import com.cci.kangdao.dto.response.AttendanceResponse;
import com.cci.kangdao.dto.response.AttendanceUserStatisticsResponse;
import org.apache.ibatis.annotations.MapKey;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

public interface AttendanceRecordTDao {
    int deleteByPrimaryKey(Long ID);

    int insert(AttendanceRecordT record);

    int insertSelective(AttendanceRecordT record);

    AttendanceRecordT selectByPrimaryKey(Long ID);

    int updateByPrimaryKeySelective(AttendanceRecordT record);

    int updateByPrimaryKey(AttendanceRecordT record);

    List<AttendanceResponse> selectByDay(@Param("attendanceDate") String attendanceDate,@Param("userId")Long userId);

    AttendanceUserStatisticsResponse selectTotalByUserId(AttendanceUserStatisticsRequest request);

    @MapKey("attendanceDate")
    Map<String, Map<String,List<AttendanceResponse>>> selectInfoByUserId(AttendanceUserStatisticsRequest request);


}
